<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<style>
    h1 {
        font-size: 100px;
        margin: 200px 0 50px;
        text-align: center;
    }

    .box {
        display: flex;
        width: 100%;
        height: 50px;
    }

    .btn1 {
        margin: 0 50px 0 614px;
    }
</style>

<body>
    <h1>hello world!</h1>
    <div class="box">
        <button class="btn1" onclick="recover()">恢复</button>
        <button class="btn2" onclick="changeColor()">变为红色</button>
    </div>
</body>
<script>
    let h1 = document.querySelector('h1');

    function recover() {
        h1.style.color = '#000';
    }

    function changeColor() {
        h1.style.color = 'red';
    }
</script>

</html>